import request from '@/utils/request'

export function getProjectList (parameter) {
  return request({
    url: '/boss/project/info/list',
    method: 'post',
    data: parameter
  })
}

export function getProjectDetail (parameter) {
  return request({
    url: '/boss/project/info/detail',
    method: 'post',
    data: parameter
  })
}

export function centerList (parameter) {
  return request({
    url: '/boss/project/manage/listResearch',
    method: 'post',
    data: parameter
  })
}

export function subjectList (parameter) {
  return request({
    url: '/boss/project/manage/listPts',
    method: 'post',
    data: parameter
  })
}

export function memberList (parameter) {
  return request({
    url: '/boss/project/team/listTeam',
    method: 'post',
    data: parameter
  })
}

export function contractList (parameter) {
  return request({
    url: '/boss/project/icf/list',
    method: 'get',
    params: parameter
  })
}

export function getPtsDetails (parameter) {
  return request({
    url: '/boss/project/manage/getPtsDetails',
    method: 'post',
    params: parameter
  })
}

export function batchAnewInvite (parameter) {
  return request({
    url: '/boss/pts/batchAnewInvite',
    method: 'post',
    params: parameter
  })
}

export function teamExport (parameter) {
  return request({
    url: '/boss/project/team/teamExport',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}

export function ifcQuestionnaire (parameter) {
  return request({
    url: '/boss/icf/ifcQuestionnaire',
    method: 'get',
    params: parameter
  })
}

export function questionnaireSubmission (parameter) {
  return request({
    url: '/boss/icf/questionnaireSubmission',
    method: 'post',
    data: parameter
  })
}

export function getAgreements(parameter, headers = {}) {
  return request({
    url: '/client/project/listMediaFilesByPin',
    method: 'get',
    params: parameter,
    headers: headers
  })
}
